package cn.tedu.mvc.pojo.vo;

/**
 * 构建枚举类型，用于定义响应状态码和消息
 */
public enum StatusCode {
    SUCCESS(200, "成功"),
    FAIL(500, "服务异常"),
    ARITHEMTIC_ZERO(5001,"除数不能为0");
    //其它状态码和消息自己基于业务添加即可
    private Integer code;
    private String message;
    private StatusCode(Integer code, String message){
        this.code=code;
        this.message=message;
    }
    public String getMessage() {
        return message;
    }
    public Integer getCode() {
        return code;
    }
}
